package com.carb.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.carb.enums.CommonDeleted;
import com.carb.enums.CommonStatus;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 物品类别实体类
 * </p>
 *
 * @author XuChaoyang
 * @since 2025-02-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_item_category")
@Schema(description = "物品类别表")
public class ItemCategory implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "物品类别id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "类别名称")
    private String name;

    @Schema(description = "类别状态 (禁用, 启用)")
    private CommonStatus status;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @Schema(description = "逻辑删除 (未删除, 已删除)")
    private CommonDeleted deleted;

}
